﻿@{
    ViewBag.Title = "Modificar";
}

<h2>Modificar</h2>

<form action="/Electro/Modificar" method="post">
<input type="hidden" name="pos" value="@ViewBag.pos" />
@{
    string[] names = Enum.GetNames(typeof(Ejercicio_productos__cano_belton_.Controllers.enumCAtegorias));    
 }

 <label>

  <span>Categoria</span>
  <select name="categoria">
    @for (int i = 0; i < names.Length; i++)
    {
        var s = names[i];
        if (i == (int)Model.categoria)
        {
            <option value="@i" selected="selected">@s</option> 
        }
        
    }
    </select>
   
</label>

<label>
    <span>ID</span>
    <input type="number" name="id" value="@Model.id" />
</label>
<br />
<label>
    <span>Nombre</span>
    <input type="text" name="nombre" value="@Model.nombre" />
</label>
<br />
<label>
    <span>Precio</span>
    <input type="number" name="precio" value="@Model.precio" />
</label>
<br />
<label>
    <span>Cantidad</span>
    <input type="number" name="cant" value="@Model.cantidad" />
</label>

<input type="submit" value="Modificar"  />


</form>

